package com.kaibes.admin.shelter;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.kaibes.module.shelter.Shelter;
import com.kaibes.module.shelter.ShelterService;
import com.kaibes.web.admin.AdminController;
import com.kaibes.web.api.ApiLink;

@AdminController
@RequestMapping("/admin/shelter")
public class ShelterController {

    @Autowired
    private ShelterService shelterService;

    @ApiLink("屏蔽管理")
    @GetMapping
    public String shelter(Model model) {
        List<Shelter> shelters = shelterService.list();
        model.addAttribute("shelterList", shelters);
        return "shelter";
    }

}
